/**
 * @file dev_bluetooth.c
 * @brief 
 * 
 * @author dalin (dalin@open-robot.com)
 * @version 1.0
 * @date 2023-05-12
 * 
 * @copyright Copyright (c) 2023  Open Robot Tech.co, Ltd
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2023-05-12 <td>1.0     <td>dalin     <td>内容
 * </table>
 */


#include "dev_bluetooth.h"
#include "drv_usart.h"
#include "mlog.h"

/* 通讯接口定义 */
#define esp32_dev  DRV_UART2


void dev_esp32_test(void)
{
    static uint8_t esp32_rxtest[DMA_IDLE_LEN];

    static uint8_t en = 0;
    uint16_t data_len = 0;
    if(en == 0)
    {
		en = 1;
        uart_start_idle_recv(esp32_dev, esp32_rxtest);
    }
    else
    {
        data_len = usart_idle_get_data(esp32_dev, esp32_rxtest);
        log_info("idle recv data len: %d", data_len);
    }
    
    // drv_uart_dma_send(esp32_dev, buf, sizeof(buf));
    // drv_uart_dma_recv(esp32_dev, esp32_rxtest, 10);

    // drv_usart_send(esp32_dev, buf, sizeof(buf), 2000);
}

int dev_bluetooth_send(void)
{
	
}


